{include file="admin/public/header" /}
<style type="text/css">
    #content-main{padding: 5px;}
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content">
       <div class="row" style="background:#fff;">
           <div class="col-sm-3">
                <div class="ibox float-e-margins">
                    <div class="ibox-content mailbox-content">
                        <div class="file-manager">
                         <!-- <div data-toggle="buttons-checkbox" class="btn-group">
                                    <a href="javascript:;" url="/" name="结构列表" class="btn btn-primary frAlert" type="button"><i class="fa fa-bars"></i> 分组列表</a>
                                    <a href="javascript:;" url="/" name="新建组织结构" class="btn btn-primary frAlert" type="button"><i class="fa fa-sticky-note"></i> 新建分组</a>
                                  
                                </div> -->
                         
                            <div class="space-25"></div>
                            <h5>分类</h5>
                            <ul class="folder-list m-b-md" style="padding: 0">
                            {volist name="cat" id="v"}
                            <a href="{:url('admin/nv/index',['catid'=>$v['id']])}">
                                  <li class="active" id="lefList">   
                                    <p style="padding-top:0px;"><i class="fa   {if condition="$v['id']==$catid"}fa-check-square{else}fa-square-o{/if}"></i> <i class="fa fa-file-text-o"></i> {$v.title}
                                    <a style="padding:5px 10px;margin-right:5px;" class="cmzbtn label label-success pull-right"></a>
                                    <!-- <a href="{:url('admin/user/index',['id'=>$v['id']])}" style="padding:5px 10px;margin-right:5px;" class="cmzbtn label label-primary pull-right">成员:共({$v.count})人</a> -->
                                    </p>
                                </li>
                            </a>
                            {/volist}
                                
                            </ul>
                          

                            
                            <div class="clearfix"></div>
                               
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-9 animated fadeInRight">
                <div class="mail-box-header">

                  
                    <h2>
                    数据列表
                     </h2>
                   <div class="mail-tools tooltip-demo m-t-md">
                        <a  href="{:url('admin/nv/edit',['catid'=>$catid])}" name="新建成员" class=" btn btn-white btn-sm"><i class="fa fa-edit"></i> 新建导航</a>
                    </div>
                </div>
                <div class="ibox-content">
                        <div class="project-list">
                        {if condition="$nav_menu"}
                            <table class="table table-hover">
                                <tbody>
                                   <tr>
                                   
                                   <td width="50px;"><input type="checkbox" class="chooseall"></td>
                                   <td width="50px;">id</td>
                                   <td width="30px;">排序</td>
                                   <td >标题</td>
                                    <td >模型/控制器/方法</td>
                                    <td>url</td>
                                    <td>打开方式</td>
                                    <td>状态</td>
                                    <td >操作</td>
                                    </tr>
                                    <form action="" class="cmzForm">
                                    <?php foreach ($nav_menu as $key => $v): ?>
                                    <tr>
                                    <td><input type="checkbox" name="id" class="checkbox1" value="{$v.id}"></td>
                                    <td>{$v.id}</td>
                                        <td >
                                            <input type="text" style="width:30px;text-align:center;" name="sort-{$v.id}" value="{$v.sort}">
                                        </td>
                                        <td >
                                           {$v.title}
                                        </td>

                                        <td >
                                           <a class="btn btn-white btn-sm"> {$v.module}/{$v.controller}/{$v.action} </a>
                                        </td>
                                        <td>{$v.url}</td>
                                        <td><a class="btn btn-success btn-xs"> {$v.target}</a></td>
                                        <td>
                                            <?php if($v['status']){ ?>
                                            <span class="label  label-success"> 显示</span>
                                            <?php }else{ ?>
                                             <span class="label  label-danger"> 隐藏</span>
                                            <?php } ?>
                                        </td>
                                        
                                        <td>
                                             <a class="btn btn-white btn-sm" href="{:url('/admin/nv/edit',['id'=>$v['id']])}"> 修改 </a>
                                        </td>
                                    </tr>
                                <?php endforeach ?>     
                                </form>                           
                                    </tbody>
                                </table>
                                      <div class="mod-table-foot">
                                        <a class="btn btn-danger cmzdelmore" where="id" table="{:encode('nv_index')}" >删除</a>
                                        <a class="btn btn-info cmzsort" table="{:encode('nv_index')}" where="id" >排序</a>
                                    </div>
                                    {else}
                                        <?php if($catid){ ?>
                                         <h5 > <div class="alet alert-info" style="padding:20px;">此分组下面没有数据</div></h5>
                                         <?php  }else{?>
                                         <h5 > <div class="alet alert-info" style="padding:20px;">请先选择分组</div></h5>
                                         <?php } ?>
                                    
                                    {/if}
                                     
                            </div>
                    </div>

             
            </div>
        </div>
    </div>
{include file="admin/public/footer" /}